﻿@{
    Html.AddScriptParts(Url.Content("~/Plugins/SevenSpikes.Nop.Plugins.AjaxCart/Scripts/AjaxCartForShoppingCartBox.js"));
    Html.AddScriptParts(Url.Content("~/Plugins/SevenSpikes.Core/Scripts/kendo.all.min.js"));
    Html.AddScriptParts(Url.Content("~/Plugins/SevenSpikes.Nop.Plugins.AjaxCart/Scripts/jquery.json-2.2.min.js"));

    Html.AddCssFileParts(Url.Content("~/Plugins/SevenSpikes.Core/Styles/kendo.common.min.css"));
    Html.AddCssFileParts(Url.Content("~/Plugins/SevenSpikes.Core/Styles/kendo.default.min.css"));

    Html.AddCssFileParts(Url.Content("~/Plugins/SevenSpikes.Nop.Plugins.AjaxCart/Themes/" + Model.NopAjaxCartSettingsModel.Theme + "/Content/styles.css"));
}
@model SevenSpikes.Nop.Plugins.AjaxCart.Models.AddProductToCartAjaxButtonModel

@if (Model.NopAjaxCartSettingsModel.EnableProductQuantityTextBox)
{
    <input id="@String.Concat("productQuantity", @Model.ProductId)" type="text" class="productQuantityTextBox" value="1" />
}
    <input type="button" value="@Model.ButtonValue" class="nopAjaxCartProductListAddToCartButton" data-productId="@Model.ProductId"/>

@if (Model.ShouldAddSettings)
{
    @Html.Hidden("addProductToCartUrl", Url.Action("AddProductToCartAjax", "NopAjaxCartShoppingCart"))
    @Html.Hidden("miniShoppingCartUrl", Url.Action("MiniShoppingCart", "NopAjaxCartShoppingCart"))
    @Html.Hidden("shoppingCartBoxUrl", Url.Action("ShoppingCartBox", "ElectronicsThemeCommon"))
    @Html.Hidden("flyoutShoppingCartUrl", Url.Action("NopAjaxCartFlyoutShoppingCart", "NopAjaxCartShoppingCart"))
    @Html.Hidden("checkProductAttributesUrl", Url.Action("CheckIfProductHasAttributesForDefaultProductVariant", "NopAjaxCartCatalog"))
    @Html.Hidden("getMiniProductDetailsViewUrl", Url.Action("GetMiniProductDetailsView", "NopAjaxCartCatalog"))
    @Html.Hidden("miniShoppingCartPanelSelector", Html.Encode(Model.NopAjaxCartSettingsModel.MiniShoppingCartPanelSelector))
    @Html.Hidden("shoppingCartBoxPanelSelector", Html.Encode(".block-mini-cart"))
    @Html.Hidden("flyoutShoppingCartPanelSelector", Html.Encode(Model.NopAjaxCartSettingsModel.FlyoutCartPanelSelector))
    @Html.Hidden("categoryPageProductsPanelSelector", Html.Encode(Model.NopAjaxCartSettingsModel.CategoryPageProductsPanelSelector))
    @Html.Hidden("shoppingCartMenuLinkSelector", Html.Encode(Model.NopAjaxCartSettingsModel.ShoppingCartMenuLinkSelector))
}